package com.shuoyue.ycgk.ui.course.playvideo;

import com.shuoyue.ycgk.base.BaseModel;
import com.shuoyue.ycgk.base.BasePresenter;
import com.shuoyue.ycgk.base.BaseResult;
import com.shuoyue.ycgk.base.BaseView;
import com.shuoyue.ycgk.base.ListWithPage;
import com.shuoyue.ycgk.entity.Course;
import com.shuoyue.ycgk.entity.CourseInfo;
import com.shuoyue.ycgk.entity.TimerTable;
import com.shuoyue.ycgk.net.RetrofitClient;
import com.shuoyue.ycgk.net.base.ApiSubscriber;
import com.shuoyue.ycgk.net.base.ApiSubscriberNoView;
import com.shuoyue.ycgk.net.gsondefaultadapter.Optional;

import io.reactivex.Observable;
import retrofit2.http.Field;

public interface CourseLearTimeContract {
    class Presenter extends BasePresenter {
        Model model = new Model();

        public void setLearTime(Integer actionId, int lasts, int argId) {
            apply(model.setLearTime(actionId, lasts, argId)).subscribe(new ApiSubscriberNoView(this) {
                @Override
                public void onNext(Object o) {
                    super.onNext(o);
                }
            });
        }
    }

    class Model extends BaseModel {
        Observable<BaseResult<String>> setLearTime(int actionId,
                                                   int lasts, int argId) {
            return RetrofitClient.getInstance().getApi().setLearnTime(actionId, lasts, null, 1, argId);
        }
    }
}
